package cn.wolfcode.luowowo.feign;

import cn.wolfcode.luowowo.common.Result;
import cn.wolfcode.luowowo.domain.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by wolfcode-lanxw
 */
@FeignClient(name = "member-server")
public interface UserInfoFeignApi {
    /**
     * 检查用户手机号码是否存在
     * @param phone
     * @return true: 手机号码存在  false: 手机号码不存在
     */
    @RequestMapping("/checkPhone")
    Result checkPhone(@RequestParam("phone") String phone);
    /**
     * 用户注册
     * @param phone
     * @param nickname
     * @param password
     * @param rpassword
     */
    @RequestMapping("/userRegist")
    Result userRegist(@RequestParam("phone") String phone, @RequestParam("nickname")String nickname, @RequestParam("password")String password, @RequestParam("rpassword")String rpassword);
    @RequestMapping("/userLogin")
    Result<Map> userLogin(@RequestParam("username")String username, @RequestParam("password")String password);
}
